home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Modeling the Dream
/
Modeling the Dream CD - Walkthroughs and Flybys II (1994)(Waite Group).iso
/
spacebar
/
reimann.txt
< prev
next >
Wrap
Text File
|
1994-08-23
|
5KB
|
298 lines
set maxcall on
set swappath "c:\temp"
init
localise
crab
terminate
init:
video l
global cr chr(10)$chr(13)
global ext ""
local trip 1 ;does the sound play?, set to false
. chdir(@c$"\\bigdemo")
opengl @c$"\bigdemo\bigdemo.ovr"
load midpak
@midpak verify
closegl
if !@0
text "The MIDPAK.COM driver is not loaded!"$@cr
text "Press any key to return to DOS."
wait
exit
endif
if !envdef(c)
text "No C environment variable! "@cr
text "To run BIGDEMO from DOS use GO.BAT"@cr
wait
exit
endif
when ESC goto terminate
set fs open(@t$"\mtd\midpak.adv") ;How big is MIDPAK.ADV
local advsize size(@fs) ;stick it in ADVSIZE
. close(@fs)
databegin ;sizes of the wave drivers
"44836"
"10590"
"10816"
"10590"
"7178"
"10590 "
"39859"
"end"
dataend
local x @ ;grab first item into var
advhop:
if @x!="end"
if @x==@advsize
text "Using wave table synthesis for MIDI"@cr
set ext ".gen"
goto advdone
else
local x @
goto advhop
endif
endif
text "Using frequency modulation (FM) MIDI files"@cr
set ext ".opl"
advdone:
opengl @c$"\bigdemo\bigdemo.ovr"
load midpak.grp digpak.grp ;load grps
closegl
if !@0
text "Error loading GRP files"
wait
exit
else
text "GRPs loaded..."$@cr
endif
. chdir(@c$"\\bigdemo")
load "_laser.raw"
digpak preloaded @_laser
digpak play
tt:
digpak done
if !@0
set trip 0
goto tt
endif
free laser
if @trip
text "Sound didn't play!!!!"@cr
wait
exit
else
text "Sound appears to be playing correctly"@cr
endif
midpak volume 100 ;MIDPAK driver has internal vol control
;mixer levels for MIDI!!!
text "Press Enter to start now"@cr@cr@cr
text "At runtime pressing Enter will advance"@cr@cr@cr
text "Press Esc at anytime to terminate"@cr@cr@cr
text "Pausing for 10 seconds"
flushkey
mark 10
wait 100
text "."
waitkey 0
getkey k name
if @k==return
return
endif
loop
return ;--------------- end of init
localise: ;subroutine checks for flics on hd
;and copies them if possible.
local ax 0 bx 0 cx 0 freebytes 0 chcnt 0 chfile " " downed 0
local runcd 0
. chdir(@t$"\\mtdtemp")
global fromcd 0
int 0x21 0x3600,,,0x0000 ;default drive
if @ax==0xffff
text "Problem getting free disk space"
pause
exitnow
endif
set freebytes (@ax*@bx*@cx)/1000
if @freebytes>=30000
set enuf 0
else
set enuf 1
endif
color 0
clearscr
color 15
window
databegin ckl
loctop:
. chdir(@t$"\\mtdtemp")
set chfile @
if @chfile<>"end"
local temp open(@chfile)
if @temp
local success close(@temp)
else
; text @chfile$": file not found"$@cr
set downed 1
endif
goto loctop
endif
. chdir(@t$"\\mtd")
if @downed==0
text 0 0 "The requisite files have been found in MTDTEMP"
waitkey 100
set fromcd 1
global drive @t
return
endif
if @downed==1&&@enuf==0
databegin
"You have more than 30MB free on this drive!
Press C if you would like to run the MIDPAK BigDemo from the CD, or
Press D to download the graphics to your hard disk for faster playback.
Please press either C or D now:"
dataend
window
color 0
clearscr
color 15
text @
flushkey
waitkey
getkey k
if @k=="d"||"D"
set fromcd 1
global drive @t
download ;go get the files...
return
endif
if @k=="c"||"C"
global drive @c
. chdir(@drive$"\\bigdemo")
return ;play as per normal
endif
endif
if @enuf==1&&@downed==1
global drive @c
. chdir(@drive$"\\bigdemo")
return ;play as per normal
endif
return
runmode:
if @fromcd==1
set thispath "\\mtdtemp\\"
endif
return
mp:
midpak use @c$"\\bigdemo\\"$@1$@ext
;midpak play
return
playit:
dload @1 d1 1
putdff d1 0 0 0
mark (d1->frames)-1
putdff d1 @playspeed @loop @loop
waitkey 0
getkey k name
if @k==return
set broken 1
break playout
endif
loop
playout:
dfree d1
return
terminate:
when esc
digpak quit ;implicit loading
midpak stop
free digpak midpak
. chdir(@c$"\\spacebar")
exit
download:
video m
color 0
window
clearscr
color 15
exec c:\dos\xcopy.exe @c$"\\flics\\reimann\*.fli "$@t$"\\mtdtemp"
video l
return
ckl:
crab7.fli
end
crab:
. chdir(@c$"\\bigdemo")
load _door3.raw _EXPLO3.raw _HIT2.raw _WHOOSH.raw
midpak use "crab7"@ext
. chdir(@t$"\\mtd")
set thispath @c$"\\flics\\reimann\\"
runmode
dload @thispath$"\\crab7.fli" d1 1
data 78 318 "_door3" 573 "_explo3" 610 "_hit2" 655 "_whoosh"
local x @
mark (d1->frames)-1
putdff d1 0 @loop-1 @loop
if @loop==@x
if @x==78
; midpak play ;remove to enable Mitch's favorite tune
else
local t @
digpak preloaded @@t
digpak play
endif
set x @
endif
waitkey 0
getkey k name
if @k==return
set broken 1
break crabout
endif
loop
crabout:
pfree p2
free _door3 _EXPLO3 _HIT2 _WHOOSH
dfree d1
return
;end of subs